package com.yi.wood.web.ctrl.dto;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author moyi
 * @since 1.0
 */
@Data
public class UserParam {

    @Size(min = 6,max = 20)
    @NotBlank
    private String userName;

    @Size(min = 6,max = 20)
    @NotBlank
    private String password;

    @Email
    private String email;

    @Pattern(regexp = "^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\\\D])|(18[0,5-9]))\\\\d{8}$")
    private String phone;

    private String photo;

    /**
     * 用户关系
     * 默认是系统用户
     */
    private Long parentId = 1L;

}
